﻿#ifndef QUERYKEYTHREAD_H
#define QUERYKEYTHREAD_H
#include <QThread>
#include <QTimer>

#ifdef Q_OS_WIN
#include <windows.h>
#pragma comment(lib, "user32.lib")
#include <qt_windows.h>
#endif

class QueryKeyThread : public QThread
{
    Q_OBJECT
public:
    QueryKeyThread(QObject* parent=0);
    ~QueryKeyThread();
    void run2();

signals:
    void queryResult(QString name);
    void mousePointChanged(POINT p);
    void cursorPointChanged(POINT p);

private:
    bool stopped;
    POINT p;    //cursor
    POINT point_mouse;  //mouse
    POINT last_p_mouse;
    QString ConvertLPWSTRToLPSTR(LPWSTR lpwszStrIn);
    QTimer* _timer;
};

#endif // QUERYKEYTHREAD_H
